/*
* Copyright (C) 2008-2009 J-P Nurmi jpnurmi@gmail.com
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* $Id: application.h 549 2009-05-15 04:46:40Z jpnurmi $
*/

#ifndef APPLICATION_H
#define APPLICATION_H

#include <QApplication>
#include "connection.h"
#include "settings.h"
#include "command.h"

class Application : public QApplication
{
    Q_OBJECT

public:
    Application(int& argc, char* argv[]);
    ~Application();

    static QString applicationSlogan();

    static Settings settings();
    static void setSettings(const Settings& settings);

    static Connections connections();
    static void setConnections(const Connections& connections);

    static Commands commands();
    static void setCommands(const Commands& commands);

public slots:
    static void aboutApplication();
    static void aboutOxygen();
    static void zoomIn(int range = 1);
    static void zoomOut(int range = 1);
    static void showSettings();

signals:
    void settingsChanged();
    void connectionsChanged();
    void commandsChanged();

private:
    struct ApplicationData
    {
        static Settings settings;
        static Connections connections;
        static Commands commands;
    };
};

#endif // APPLICATION_H
